/*
 *	ApOS (Another Project software for s3c2410)
 *	
 *	This program is free software; you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License version 2 as
 *	published by the Free Software Foundation.
 *			
 *
 */
#ifndef _IO_H
#define _IO_H

#define PORT_A 0
#define PORT_B 1
#define PORT_C 2
#define PORT_D 3
#define PORT_E 4
#define PORT_F 5
#define PORT_G 6
#define PORT_H 7

#define EINT23 23
#define EINT22 22
#define EINT21 21
#define EINT20 20
#define EINT19 19
#define EINT18 18
#define EINT17 17
#define EINT16 16
#define EINT15 15
#define EINT14 14
#define EINT13 13
#define EINT12 12
#define EINT11 11
#define EINT10 10
#define EINT9 9
#define EINT8 8
#define EINT7 7
#define EINT6 6
#define EINT5 5
#define EINT4 4
#define EINT3 3
#define EINT2 2
#define EINT1 1
#define EINT0 0

#define SIG_METHOD_LOW_LEV 0
#define SIG_METHOD_HIG_LEV 1
#define SIG_METHOD_FAL_EDGE_TRIG 2
#define SIG_METHOD_RIS_EDGE_TRIG 4
#define SIG_METHOD_BOTH_EDGE_TRIG 6

#define IO_IN 0
#define IO_OUT 1
struct io_control_obj
{
	volatile unsigned int *gpa_con;
	volatile unsigned int *gpa_data;
                        
	volatile unsigned int *gpb_con;
	volatile unsigned int *gpb_data;
	volatile unsigned int *gpb_up;
	
	volatile unsigned int *gpc_con;
	volatile unsigned int *gpc_data;
	volatile unsigned int *gpc_up;

	volatile unsigned int *gpd_con;
	volatile unsigned int *gpd_data;
	volatile unsigned int *gpd_up;

	volatile unsigned int *gpe_con;
	volatile unsigned int *gpe_data;
	volatile unsigned int *gpe_up;

	volatile unsigned int *gpf_con;
	volatile unsigned int *gpf_data;
	volatile unsigned int *gpf_up;

	volatile unsigned int *gpg_con;
	volatile unsigned int *gpg_data;
	volatile unsigned int *gpg_up;

	volatile unsigned int *gph_con;
	volatile unsigned int *gph_data;
	volatile unsigned int *gph_up;
	
	volatile unsigned int *misccr;
	volatile unsigned int *dclkcon;
	volatile unsigned int *extint0;
	volatile unsigned int *extint1;
	volatile unsigned int *extint2;
	volatile unsigned int *eintflt0;
	volatile unsigned int *eintflt1;
	volatile unsigned int *eintflt2;
	volatile unsigned int *eintflt3;
	volatile unsigned int *eintmask;
	volatile unsigned int *eintpend;
	volatile unsigned int *gstatus0;
	volatile unsigned int *gstatus1;
	volatile unsigned int *gstatus2;
	volatile unsigned int *gstatus3;
	volatile unsigned int *gstatus4;

};


#endif

